package com.zhf.comsumer;

import com.zhf.framework.Invocation;
import com.zhf.framework.ProxyFactory;
import com.zhf.framework.http.HttpClient;
import com.zhf.provider.api.HelloService;

public class Consumer {

    public static void main(String[] args) {

//        HttpClient httpClient = new HttpClient();
//        Invocation invocation = new Invocation(HelloService.class.getName(), "sayHello", new Class[]{String.class}, new Object[]{"zhf"});
//        String result = httpClient.send("localhost", 8080, invocation);
//        System.out.println(result);


        HelloService helloService = ProxyFactory.getProxy(HelloService.class);
        String xxx = helloService.sayHello("xxx");
        System.out.println(xxx);


    }
}
